//
//  YXSearchBarView.m
//  CreditCard
//
//  Created by 杨旭 on 2017/12/23.
//  Copyright © 2017年 杨旭. All rights reserved.
//

#import "YXSearchBarView.h"

@interface YXSearchBarView ()<UISearchBarDelegate>

@end

@implementation YXSearchBarView

- (instancetype)initWithFrame:(CGRect)frame {
    if (self = [super initWithFrame:frame]) {
        [self addSubview:self.searchBar];
    }
    return self;
}
- (YXSearchBar *)searchBar {
    if (!_searchBar) {
        _searchBar = [[YXSearchBar alloc]initWithFrame:CGRectZero];
        _searchBar.layer.cornerRadius = 20;
        _searchBar.layer.masksToBounds = YES;
        _searchBar.layer.borderWidth = 0.5;
        _searchBar.layer.borderColor = [UIColor grayColor].CGColor;
        _searchBar.delegate = self;
        _searchBar.frame = CGRectMake(20, 15, kScreenWidth - 40, 40);
    
    }
    return _searchBar;
}


@end
